import redis


# 构造redis连接对象
redis_conn = redis.StrictRedis(
    host='localhost',
    port='6379',
    password='',
    decode_responses=True
)

ret = redis_conn.execute_command('keys *')
print(ret)
print(type(ret))

ret = redis_conn.execute_command('lpush k3 listitem1')
print(ret)
ret = redis_conn.execute_command('lpop k3')
print(ret)